package bavaria.hightech.b2b;

import bavaria.hightech.banking.Money;
import bavaria.hightech.exception.WrongValueException;

public interface IB2B {
	
	/**
	 * Method for transfering money from one account to another at different banks
	 * @param bankName bank name to which the money should be transfered
	 * @param accountNumberFrom account number of the account from which the money should be transfered.
	 * The Account Number must be from the actual bank
	 * @param accountNumberTo account number of the account to which the money should be transfered.
	 * @param money Money-Object (Value and Currency) which should be transfered
	 * @return Success
	 * @throws WrongValueException
	 */
	public boolean transfer (String bankName, int accountNumberFrom, 
			int accountNumberTo, Money money) throws WrongValueException;
	
	/**
	 * Method for correction of an non successfull bank transfer
	 * @param accountNumberTo account number of the account from which the money should be transfered.
	 * To this account the money will be re-transfered
	 * @param money Money-Object (Value and Currency) which should be transfered
	 * @return Success
	 * @throws WrongValueException
	 */
	public boolean correctionTransfer (int accountNumberTo, Money money) throws WrongValueException;
	
	public boolean cashInValue (int accountNumber, Money money, String reason) throws WrongValueException;
}
